 <?php

 /**
 * model_log
 * 系统日记
 */

 class Model_log extends YOU {

 	public function __construct()
 	{
 		parent::__construct();
 	}
 	/** 系统日记 **/
 	function Add($log_creategory,$log_name,$date_star,$date_end)
 	{
 		
 		// 用户日记参数
 		$log_ip   = $_SERVER["REMOTE_ADDR"];
 		$log_time = date('Y-m-d H:i:s');
 		$row = $this->db->fetchRow("SELECT * FROM `tbl_menu` WHERE menu_fun='{$log_creategory}'");
 		
 		$info = array(
 		"log_name"  			=> $log_name,
 		"log_time"       		=> $log_time,
 		"log_ip"       			=> $log_ip,
 		"log_creategory"       	=> $row['menu_name'],
 		"status"                => 1,
 		"create_time"           => $date_star,
 		"update_time"           => $date_end,
 		);
 		$this->db->do_insert("tbl_log", $info);
		
 		return $info;
 	}




 }



?>